<!--
 * @Author: zhangweinan
 * @Date: 2022-12-14 09:50:15
 * @LastEditors: zhangweinan
 * @LastEditTime: 2023-01-06 14:19:56
 * @Description: file content
 * @FilePath: \front-end-of-task-center\src\views\roles\invitation\selectDialog\select.vue
-->
<template>
  <el-dialog
    :visible.sync="dialogTabsVisible"
    :width="width"
    @close="Cancel"
    title="选择专家"
  >
    <el-tabs v-model="activeName" @tab-click="handleClick" type="card">
      <el-tab-pane name="first">
        <span slot="label"> 定向选择</span>
        <determineSelect @cancel="Cancel" v-on="$listeners"
      /></el-tab-pane>
      <el-tab-pane name="second"
        ><span slot="label"> 随机抽取</span
        ><randomSelect @cancel="Cancel" v-on="$listeners"
      /></el-tab-pane>
    </el-tabs>
  </el-dialog>
</template>
<script>
import randomSelect from "./randomSelect.vue";
import determineSelect from "./determineSelect.vue";
export default {
  name: "selectExpert",
  components: {
    randomSelect,
    determineSelect,
  },
  props: {
    width: {
      type: String,
      require: false,
      default: "50%",
    },
  },
  data() {
    return {
      activeName: "first",
      dialogTabsVisible: false,
    };
  },
  methods: {
    show() {
      this.dialogTabsVisible = true;
    },
    Cancel() {
      this.dialogTabsVisible = false;
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>
